package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Role;
import cn.wolfcode.crm.query.QueryObject;

import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {

    //根据角色id删除角色与权限的关系
    void deleteRolePermissionRelation(Long id);

    //保存角色与权限的关系
    void saveRolePermissionRelation(@Param("roleId")Long roleId, @Param("permissionId")Long permissionId);


    void deleteByPrimaryKey(Long id);

    void insert(Role record);

    Role selectByPrimaryKey(Long id);

    List<Role> selectAll();

    void updateByPrimaryKey(Role record);

    int queryForCount(QueryObject qo);

    List<Role> queryForList(QueryObject qo);


    //根据员工id查询所有角色id
    List<Long> queryRoleIdByEmpId(Long empId);


    List<String> queryRoleSnByEmpId(Long id);
}